package com.mdd.common.entity.zdjd.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel("设备油耗数据DTO")
public class DeviceOilConsumption implements Serializable {

    @ApiModelProperty(value = "月")
    private String month;

    @ApiModelProperty(value = "油耗值")
    private Double oilConsumption;

    public static DeviceOilConsumption convert(String month, Double oilConsumption) {
        DeviceOilConsumption deviceOilConsumption = new DeviceOilConsumption();
        deviceOilConsumption.setMonth(month);
        deviceOilConsumption.setOilConsumption(oilConsumption);
        return deviceOilConsumption;
    }

}
